Skip to content

feat(theme): Add fontFamily property to BulletStyle#2811

Merged
awahab07 merged 9 commits into
elastic:mainfrom
awahab07:249382-Bullet-Graph-Chart-add-support-to-customize-fonts
Apr 3, 2026
Merged

feat(theme): Add fontFamily property to BulletStyle#2811
awahab07 merged 9 commits into
elastic:mainfrom
awahab07:249382-Bullet-Graph-Chart-add-support-to-customize-fonts

Conversation

@awahab07
Copy link
Copy Markdown
Collaborator

@awahab07 awahab07 commented Apr 1, 2026

Summary

Adds fontFamily property to BulletStyle so that consumers can override fonts for Bullet Graph charts. The requirement emerged when Lens in Kibana started introducing the monospaced font"Elastic UI Numeric" for all charts in Lens. All charts, except Gauge chart, inherited the monospaced font (see). Gauge chart didn't inherit because it doesn't read and apply the fontFamily from theme config.

The stories

  • Bullet Graph -> Single
  • Bullet Graph -> Angular

demonstrate the bullet graphs adopting the monospaced font "Elastic UI Numeric":
image

image

Details

The font face for "Elastic UI Numeric" is defined in Storybook the same way as in Kibana, by bundling .woff2 file along with License and defining the font face.

Plus a new story Test Cases -> Font Measurement Test, demonstrates that font measurements and responsiveness work with the monospaced "Elastic UI Numeric" font.

image

Issues

Follows up: elastic/kibana#249382

Closes #2812

Checklist

  • The proper chart type label has been added (e.g. :xy, :partition)
  • The proper feature labels have been added (e.g. :interactions, :axis)
  • All related issues have been linked (i.e. closes #123, fixes #123)
  • New public API exports have been added to packages/charts/src/index.ts
  • Unit tests have been added or updated to match the most common scenarios
  • The proper documentation and/or storybook story has been added or updated
  • The code has been checked for cross-browser compatibility (Chrome, Firefox, Safari, Edge)
  • Visual changes have been tested with light and dark themes

@awahab07 awahab07 added :theme :bullet Bullet chart related issues labels Apr 1, 2026
@awahab07
Copy link
Copy Markdown
Collaborator Author

awahab07 commented Apr 1, 2026

buildkite update vrt

@awahab07 awahab07 changed the title feat(theme): Add fontFamily property to BulletStyle. feat(theme): Add fontFamily property to BulletStyle Apr 1, 2026
@elastic-datavis
Copy link
Copy Markdown
Contributor

@awahab07 awahab07 marked this pull request as ready for review April 2, 2026 00:44
@awahab07 awahab07 merged commit a23b25c into elastic:main Apr 3, 2026
14 checks passed
nickofthyme pushed a commit that referenced this pull request Apr 14, 2026
# [71.5.0](v71.4.1...v71.5.0) (2026-04-14)

### Bug Fixes

* guard process.env for browser environments without bundler polyfills ([#2810](#2810)) ([9ffd74e](9ffd74e))
* remove `produce()` from selectors ([#2813](#2813)) ([561162c](561162c))

### Features

* **theme:** Add `fontFamily` property to `BulletStyle` ([#2811](#2811)) ([a23b25c](a23b25c))
* **theme:** Add `fontFamily` property to `MetricStyle` ([#2816](#2816)) ([5bcaf24](5bcaf24))
awahab07 added a commit to elastic/kibana that referenced this pull request Apr 15, 2026
Upgrades the `@elastic/charts` to version `71.5.0` (from `71.4.0`).


[`71.5.0`](https://github.com/elastic/elastic-charts/releases/tag/v71.5.0)
includes the following two necessary theme updates which Lens needs to
accurately render monospaced font for Metric and Gauge charts.
- elastic/elastic-charts#2811
- elastic/elastic-charts#2816

|Before v71.4.0|After v71.5.0|
|:--:|:--:|
|<img width="642" height="614" alt="image"
src="https://github.com/user-attachments/assets/3df7090d-35bd-4921-9027-35f7db1e9bca"
/>|<img width="641" height="622" alt="image"
src="https://github.com/user-attachments/assets/48010014-c76d-4301-b133-86d192f4161e"
/>|
awahab07 added a commit to awahab07/kibana that referenced this pull request Apr 17, 2026
Upgrades the `@elastic/charts` to version `71.5.0` (from `71.4.0`).

[`71.5.0`](https://github.com/elastic/elastic-charts/releases/tag/v71.5.0)
includes the following two necessary theme updates which Lens needs to
accurately render monospaced font for Metric and Gauge charts.
- elastic/elastic-charts#2811
- elastic/elastic-charts#2816

|Before v71.4.0|After v71.5.0|
|:--:|:--:|
|<img width="642" height="614" alt="image"
src="https://github.com/user-attachments/assets/3df7090d-35bd-4921-9027-35f7db1e9bca"
/>|<img width="641" height="622" alt="image"
src="https://github.com/user-attachments/assets/48010014-c76d-4301-b133-86d192f4161e"
/>|

(cherry picked from commit b1617e3)

# Conflicts:
#	src/platform/packages/private/kbn-ui-shared-deps-npm/version_dependencies.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:bullet Bullet chart related issues :theme

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add fontFamily customization support for Bullet Graph charts

2 participants